package com.example.wanjialei.controller;

import com.example.wanjialei.pojo.Summary;
import com.example.wanjialei.service.SummaryService;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.Map;

@CrossOrigin
@RestController
public class SummaryController {
    @Resource
    private SummaryService summaryService;
//    联表查询
    @RequestMapping("/getAllSummaryInfo")
    public Map<String ,Object> getSummaryInfo( Summary summary) {
        return summaryService.getAllSummary(summary);
    }
    @RequestMapping("/insert")
    public Map<String ,Object> insert(@RequestBody Summary summary) {
        return summaryService.insert(summary);
    }
}
